Skip to content

fix(opencode): handle unsupported import formats#23970

Open
LufyCZ wants to merge 1 commit intoanomalyco:devfrom
LufyCZ:import-format-message
Open

fix(opencode): handle unsupported import formats#23970
LufyCZ wants to merge 1 commit intoanomalyco:devfrom
LufyCZ:import-format-message

Conversation

@LufyCZ
Copy link
Copy Markdown

@LufyCZ LufyCZ commented Apr 23, 2026

Issue for this PR

Closes #23957

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Opencode currently returns a misleading "File not found" message when importing unsupported file formats. This PR adds an early check for if a file exists and fails with File not found if it doesn't, or with Unsupported format: ${args.file} is not a valid JSON session file if it does but does not have a supported format.

How did you verify your code works?

A quick bun dev import foo.md run.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@LufyCZ LufyCZ force-pushed the import-format-message branch from 4d432ac to b024222 Compare April 23, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trying to import Markdown session transcript fails with "File not found" instead "Unsupported format"

1 participant